package Client;

import javax.swing.ImageIcon;

public class ContactEntry {
	private final String mContactName;
	private final String mImagePath;
	private ImageIcon mImageIcon;

	public ContactEntry(String contactName, String imagePath) {
		mContactName = contactName;
		mImagePath = imagePath;
	}

	public String getContactName() {
		return mContactName;
	}

	public ImageIcon getContactIcon() {
		if (mImageIcon == null) {
			mImageIcon = new ImageIcon(mImagePath);
		}
		return mImageIcon;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return mContactName;
	}
}
